home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS Toolkit
/
BBS Toolkit.iso
/
rbbs_pc
/
dc174v11.zip
/
RSB4DROP.MRG
< prev
next >
Wrap
Text File
|
1992-10-03
|
4KB
|
95 lines
* ------------[ BLED merge (c) Ken Goosens ]-------------
* Merge this against RBBSSUB4.BAS to produce RBBSSUB4.NEW
* RBBSSUB4.BAS: Date 6-20-1992 Size 120885 bytes
* DROP174 (c) 1992 by Richie Molinelli
* ------------[ Created 10-03-1992 22:14:26 ]------------
* REPLACING old line(s) by new
58250 ' $SUBTITLE: 'SmartText - smart text substitution'
' $PAGE
'
' NAME -- SmartText (WRITTEN BY DOUG AZZARITO)
'
' INPUTS -- StringWork$ string to scan for Smart Text
' CRFound Does this line contain a CR?
' ZSmartTextCode Smart Text control code
'
' OUTPUTS -- StringWork$ Input string with Smart replaced
'
' PURPOSE -- Smart Text allows control strings in text files
' to be replaced at runtime with user info or other
' data. The Smart Text control code is a 1-byte
' code (configurable) with a 2-byte action code.
'
SUB SmartText (StringWork$, CRFound, OverStrike) STATIC
IF SmartCarry$<>"" THEN _
StringWork$ = SmartCarry$+StringWork$
Index = INSTR(StringWork$, ZSmartTextCode$)
WHILE Index > 0 AND Index < LEN(StringWork$)-1
IF INSTR(MID$(StringWork$, Index+1,2)," ") THEN _
SmartAct = 0 _
ELSE _
SmartAct = INSTR(ZSmartTable$, MID$(StringWork$, Index+1, 2))
IF SmartAct = 0 THEN _
WasI = 1 : _
GOTO 58254
SmartAct = (SmartAct+2)/3
ON SmartAct GOSUB 58260, 58261, 58262, 58263, 58264, 58265, _
58266, 58267, 58268, 58269, 58270, _
58271, 58272, 58273, 58274, 58275, _
58276, 58277, 58278, 58279, 58280, _
58281, 58282, 58283, 58284, 58285, _
58286, 58287, 58289, 58290, 58291, _
* ------[ first line different ]------
58292, 58293, 58294, 58295, 58255 ' DROP174
GOSUB 58256
WasI = LEN(SmartHold$)
ReplaceLen = 3
IF OverStrike OR Overlay THEN _
IF WasI > 2 THEN _
ReplaceLen = WasI _
ELSE _
SmartHold$ = SmartHold$ + SPACE$(3 - WasI)
StringWork$ = LEFT$(StringWork$, Index-1) + SmartHold$ + _
MID$(StringWork$,Index+ReplaceLen)
58254 Index = INSTR(Index+WasI, StringWork$, ZSmartTextCode$)
WEND
IF Index AND (Index > LEN(StringWork$)-2) AND NOT CRFound THEN _
SmartCarry$ = MID$(StringWork$,Index) : _
StringWork$ = LEFT$(StringWork$,Index-1) : _
ELSE _
SmartCarry$ = ""
EXIT SUB
* INSERTING new line(s)
58255 SmartHold$ = STR$(ZDropTimes) ' CD Carrier Drops ' DROP174
CALL Trim (SmartHold$) ' DROP174
RETURN ' DROP174
58256 IF TrimSmart THEN _
CALL Trim (SmartHold$)
RETURN
* REPLACING old line(s) by new
64645 ' * sets new user defaults
' * formerly 12900 of rbbs-pc.bas
SUB SetNewUserDef STATIC
LSET ZUserName$ = ZActiveUserName$
LSET ZUserOption$ = MKI$(0) + _
MKI$(0) + _
" 0" + _
MKI$(64) + _
MKI$(16) + _
MKI$(0) + _
CHR$(23) + _
ZDefaultEchoer$
LSET ZUserDnlds$ = MKI$(0)
LSET ZUserUplds$ = MKI$(0)
IF ZEnforceRatios THEN _
LSET ZTodayDl$ = MKS$(0) : _
LSET ZTodayBytes$ = MKS$(0) : _
LSET ZDlBytes$ = MKS$(0) : _
LSET ZULBytes$ = MKS$(0)
LSET ZSecLevel$ = MKI$(ZTempSecLevel)
LSET ZElapsedTime$ = MKI$(0)
* ------[ first line different ]------
LSET ZDropTimes$ = CHR$(0) ' DROP174
LSET ZBankTime$ = CHR$(0)
END SUB